<%@ page language="java" isELIgnored="false" import="java.util.*"
	pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@page import="com.testingedu.model.TUser"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>修改用户密码</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath}/css/pingTai/pingTai.css">
	<SCRIPT type="text/javascript" language="javascript"
			src="${pageContext.request.contextPath}/js/jquery-1.7.2.js"></SCRIPT>
	<script src="${pageContext.request.contextPath}/js/utils.js" type="text/javascript" language="javascript"></script>
</head>
	<body>

		<table width="100%" border="0" align="center" cellpadding="0"
			cellspacing="0">
			<tr>
				<td height="3"></td>
			</tr>
			<tr height="20" valign="baseline">
				<td bgcolor="#353c44">
					<img src="${pageContext.request.contextPath}/images/pingTai/tb.gif"
						width="14" height="14" />
					<span class="STYLE1">用户修改密码</span>
				</td>
				<td align="right" bgcolor="#353c44">
					<span class="STYLE1"> </span>
				</td>
			</tr>
			<tr>
				<td height="3" colspan="2"></td>
			</tr>
		</table>
		<form action="${pageContext.request.contextPath}/admin/myInfo/mUpdate?url=uPass" method="post" id="_form">
			<table width="100%" border="0" cellpadding="0" cellspacing="1"
				bgcolor="#a8c7ce">
				<tr bgcolor="#FFFFFF" class="STYLE19">
					<td align="center" width="15%">
						旧密码:
						<input type="hidden" name="id" value="<%=((TUser)session.getAttribute("testingedu_admin")).getId() %>">
						<input type="password" name="oldPass" id="_oldPass">
					</td>
				</tr>
				<tr bgcolor="#FFFFFF" class="STYLE19">
					<td align="center" width="15%">
						新密码:
						<input type="password" name="newPass_1"
							value="" id="_newPass_1"/>
					</td>
				</tr>
				<tr bgcolor="#FFFFFF" class="STYLE19">
					<td align="center" width="15%">
						确认密码:
						<input type="password" name="newPass_2"
							value="" id="_newPass_2"/>
					</td>
				</tr>
				<tr bgcolor="#FFFFFF" class="STYLE19">
					<td colspan="2" align="center">
						<input type="button" value="修改" onclick="update_to_password();"
							class="button2" />
						&nbsp;&nbsp;
						<input type="button" value="返回"
							onclick="javascript:history.go(-1);" class="button2" />
					</td>
				</tr>
			</table>
		</form>
<script type="text/javascript">
function update_to_password() {
	var oldPass = $('#_oldPass').val();
	if(!utils_stringLength(oldPass, '旧密码', 4, 20))
		return;
	var newPass_1 = $('#_newPass_1').val();
	if(!utils_stringLength(newPass_1, '新密码', 4, 20))
		return;
	var newPass_2 = $('#_newPass_2').val();
	if(newPass_2 != newPass_1) {
		alert('新密码和确认密码不匹配！');
		return;
	}
	$('#_form').submit();
}
</script>
</html>
